//
//  PageTesViewtController.m
//  Example
//
//  Created by admin on 2020/4/26.
//  Copyright © 2020 admin. All rights reserved.
//

#import "PageTesViewtController.h"
#import <Foundation/Foundation.h>



@interface PageTesViewtController ()

@property(strong, nonatomic) PageCollectionView *headCollectionView;
@property(strong, nonatomic) UICollectionViewFlowLayout *flowLayout;

@end

@implementation PageTesViewtController

- (void)viewDidLoad {
    [super viewDidLoad];
    [self configUI];
}

-(void)configUI{
    [self.view addSubview:self.headCollectionView];
}



-(PageCollectionView *)headCollectionView{
    if (!_headCollectionView) {
        _headCollectionView = [[PageCollectionView alloc] initWithFrame:CGRectZero collectionViewLayout:self.flowLayout];
       
        [_headCollectionView setItems:@[
            @{@"title":@"申请售后" },
            @{@"title":@"处理中" },
            @{@"title":@"待评价" }
        ]];
    }
    return _headCollectionView;
}
-(UICollectionViewFlowLayout *)flowLayout{
    if (!_flowLayout) {
        
        _flowLayout = [UICollectionViewFlowLayout new];
        _flowLayout.minimumLineSpacing = 0.0;
        _flowLayout.minimumInteritemSpacing = 0.0;
        _flowLayout.scrollDirection = UICollectionViewScrollDirectionHorizontal;
        _flowLayout.itemSize = CGSizeMake(KWidth/3, 44);
    }
    return _flowLayout;
}
-(void)viewDidLayoutSubviews{
    [super viewDidLayoutSubviews];
    [_headCollectionView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(self.view);
        make.left.right.mas_equalTo(self.view);
        make.height.mas_equalTo(44);
    }];
}

@end
